package com.tbs.lock.config;

import com.tbs.lock.ILockProvider;
import com.tbs.lock.impls.providers.JdkLockProvider;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 锁属性
 *
 * @author abstergo
 */
@ConfigurationProperties(prefix = "tbs.lock")
@Data
public class LockProperty {

    /**
     * 锁提供者类型,默认jdk锁
     */
    private Class<? extends ILockProvider> lockProviderType = JdkLockProvider.class;

    /**
     * 获取锁超时时间，默认1秒,单位毫秒
     */
    private int accquireTimeout = 1000;
}
